This sample demonstrates raising a toast with secondary buttons in order to accept a call on the lock screen.
This sample demonstrates the following:
- Raising a simple toast with secondary actions. For more information on toasts, see the Toasts SDK Sample.
- Accepting secondary actions either as a normal call or as a call on the lock screen.
- Hiding controls when being displayed on the lock screen.
- Ending a call on the lock screen because the other party hung up.
- Ending a call on the lock screen because the user requested it.
- Continuing a call from the lock screen to the user session.
Note that in order for the application to be able to display toasts on the lock screen, you must select Allow when prompted.
An app that has a lock screen presence must declare one or more of the following types of background tasks:
- Control channel
- Timer
- Push notification
In Microsoft Visual Studio, this value is set in the Declarations page of the manifest editor, which sets the
BackgroundTasks element in the package.appxmanifest file. The background task typically connects to the back end service and listens for inbound calls. This sample declares but never schedules a placeholder background task (backgroundTask.js
for JavaScript, SamplePlaceholder for C# and C++). Instead, inbound calls are simulated with a timer.
To obtain an evaluation copy of Windows 8.1, go to Windows 8.1.
To obtain an evaluation copy of Microsoft Visual Studio 2013, go to Visual Studio 2013.
Note For Windows 8 app samples, download the Windows 8 app samples pack. The samples in the Windows 8 app samples pack will build and run only on Microsoft Visual Studio 2012.
Related topics
Operating system requirements
| Client | |
|---|---|
| Server |
Build the sample
- Start Visual Studio 2013 and select File > Open > Project/Solution.
- Go to the directory in which you unzipped the sample. Go to the directory named for the sample, and double-click the Visual Studio 2013 Solution (.sln) file.
- Press F7 or use Build > Build Solution to build the sample.
Run the sample
To debug the app and then run it, press F5 or use Debug > Start Debugging. To run the app without debugging, press Ctrl+F5 or use Debug > Start Without Debugging.